﻿@using GTAuto.DAL.DAL
@using System.Linq;
@using GTAuto.DAL.Enums
@{
    int count;
    var brends = DALBrands.Singleton.GetPaged(1, 1000000, out count);

    var autoBrends = from p in brends
                     where p.Type == (decimal)BrandTypeEnum.Auto
                     orderby p.Name
                     select p;

    var tiresBrends = from p in brends
                      where p.Type == (decimal)BrandTypeEnum.Tires
                      orderby p.Name
                      select p;

    var discBrends = from p in brends
                      where p.Type == (decimal)BrandTypeEnum.Disc
                      orderby p.Name
                      select p;
                      
}
<h3>
    Модели авто</h3>
<ul class="toggle">
    @foreach (var item in autoBrends)
    {
        <li class="icn_add_user selected">@Html.ActionLink(item.Name, "ModelsByBrend", "BrandModels", new { @id = item.Id }, new { })
        </li>
    }
</ul>
<h3>
    Резина</h3>
<ul class="toggle">
    @foreach (var item in tiresBrends)
    {
        <li class="icn_add_user selected">@Html.ActionLink(item.Name, "ModelsByBrend", "BrandModels", new { @id = item.Id }, new { })
        </li>
    }
</ul>

<h3>
    Диски </h3>
<ul class="toggle">
    @foreach (var item in discBrends)
    {
        <li class="icn_add_user selected">@Html.ActionLink(item.Name, "ModelsByBrend", "BrandModels", new { @id = item.Id }, new { })
        </li>
    }
</ul>